//package com.xingkeduo.rabbitmq.handler;
//
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import com.rabbitmq.client.Channel;
//import com.xingkeduo.pojo.NextConsumer;
//import com.xingkeduo.pojo.NextConsumerTjo;
//import com.xingkeduo.pojo.ShopSession;
//import com.xingkeduo.send.RabbitMqSender;
//import com.xingkeduo.util.ConstUtil;
//import com.xingkeduo.util.SendUtil;
//
///**
// *
// * @author GJ
// * @time 2018年12月17日 上午11:46:58
// * @description
// */
//@Component
//public class NextConsumerHandler {
//	@Autowired
//	private RabbitMqSender rabbitMqSender;
//
//	@RabbitListener(queues = "NextConsumerQueue")
//	@RabbitHandler
//	public void directMessage1(String sendMessage, Channel channel, Message message) {
//		try {
//			NextConsumer nextConsumer = NextConsumerTjo.createTable(sendMessage);
//
//			ShopSession shopSession = ConstUtil.getClient(nextConsumer.getShopId())
//					.setMessage(nextConsumer.getConsumerId()).setShopName(nextConsumer.getShopId());
//			SendUtil.sendMessageTo(shopSession);
//			SendUtil.sendMessageToMonitor(shopSession);
//
//			System.out.println("NextConsumerQueue {} directMessage :" + sendMessage);
//			rabbitMqSender.ack(channel, message);
//		} catch (Throwable t) {
//			// TODO: handle exception
//		}
//	}
//}
